<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" media="screen" href="../../css/bootstrap.min.css">
</head>
<body>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
	<form class="form-horizontal" onsubmit="return false" id="form">
		<fieldset>
			<div class='form-group'>
				<label class='col-md-1 control-label'>立项时间</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='approvalTime' type='text' name='approvalTime' id='approvalTime' data-bv-notempty='true' data-bv-notempty-message='approvalTime 不能为空'>
				</div>
				<label class='col-md-1 control-label'>项目编号</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='projectNumber' type='text' name='projectNumber' id='projectNumber' data-bv-notempty='true' data-bv-notempty-message='projectNumber 不能为空'>
				</div>
				<label class='col-md-1 control-label'>项目名称</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='entryName' type='text' name='entryName' id='entryName' data-bv-notempty='true' data-bv-notempty-message='entryName 不能为空'>
				</div>
				<label class='col-md-1 control-label'>项目地点</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='projectLocation' type='text' name='projectLocation' id='projectLocation' data-bv-notempty='true' data-bv-notempty-message='projectLocation 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-1 control-label'>项目金额(万)</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='projectAmount' type='text' name='projectAmount' id='projectAmount' data-bv-notempty='false' data-bv-notempty-message='projectAmount 不能为空'>
				</div>
				<label class='col-md-1 control-label'>集成商名称</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='integratorName' type='text' name='integratorName' id='integratorName' data-bv-notempty='false' data-bv-notempty-message='integratorName 不能为空'>
				</div>
				<label class='col-md-1 control-label'>用户名称</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='userName' type='text' name='userName' id='userName' data-bv-notempty='false' data-bv-notempty-message='userName 不能为空'>
				</div>
				<label class='col-md-1 control-label'>用户场景</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='userScenarios' type='text' name='userScenarios' id='userScenarios' data-bv-notempty='false' data-bv-notempty-message='userScenarios 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-1 control-label'>主要产品</label>
				<div class='col-md-2'>
					<select class="form-control input-sm" name="mainProducts" id="mainProducts">
					</select>
				</div>
				<label class='col-md-1 control-label'>规格</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='specifications' type='text' name='specifications' id='specifications' data-bv-notempty='false' data-bv-notempty-message='specifications 不能为空'>
				</div>
				<label class='col-md-1 control-label'>数量</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='number' type='text' name='number' id='number' data-bv-notempty='false' data-bv-notempty-message='number 不能为空'>
				</div>
				<label class='col-md-1 control-label'>招投标方式</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='biddingMode' type='text' name='biddingMode' id='biddingMode' data-bv-notempty='false' data-bv-notempty-message='biddingMode 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-1 control-label'>招投标时间</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='biddingTime' type='text' name='biddingTime' id='biddingTime' data-bv-notempty='false' data-bv-notempty-message='biddingTime 不能为空'>
				</div>
				<label class='col-md-1 control-label'>成功率(%)</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='successRate' type='text' name='successRate' id='successRate' data-bv-notempty='false' data-bv-notempty-message='successRate 不能为空'>
				</div>
				<label class='col-md-1 control-label'>项目进展</label>
				<div class='col-md-2'>
					<select class="form-control input-sm" name="projectDebriefing" id="projectDebriefing">
					</select>
				</div>
				<label class='col-md-1 control-label'>友商</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='friendBusiness' type='text' name='friendBusiness' id='friendBusiness' data-bv-notempty='false' data-bv-notempty-message='friendBusiness 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-1 control-label'>竞品信息</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='competitiveProInfo' type='text' name='competitiveProInfo' id='competitiveProInfo' data-bv-notempty='false' data-bv-notempty-message='competitiveProInfo 不能为空'>
				</div>
				<label class='col-md-1 control-label'>预计落地时间</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='estimateLandingTime' type='text' name='estimateLandingTime' id='estimateLandingTime' data-bv-notempty='false' data-bv-notempty-message='estimateLandingTime 不能为空'>
				</div>
				<label class='col-md-1 control-label'>预计安装时间</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='estimatedInstallationTime' type='text' name='estimatedInstallationTime' id='estimatedInstallationTime' data-bv-notempty='false' data-bv-notempty-message='estimatedInstallationTime 不能为空'>
				</div>
				<label class='col-md-1 control-label'>失败及原因</label>
				<div class='col-md-2'>
					<input class='form-control' placeholder='failureAndReasons' type='text' name='failureAndReasons' id='failureAndReasons' data-bv-notempty='false' data-bv-notempty-message='failureAndReasons 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-1 control-label'>备注</label>
				<div class='col-md-11'>
					<input class='form-control' placeholder='remark' type='text' name='remark' id='remark' data-bv-notempty='false' data-bv-notempty-message='remark 不能为空'>
				</div>
			</div>
			<div class="form-actions">
				<div class="row" align="center">
					<div class="col-md-12">
					    <button class="btn btn-primary" onclick="location.href='projectFollowInfoList.html'">返回</button>
						<button class="btn btn-primary" type="submit" onclick="add()">
							<i class="fa fa-save"></i> 保存
						</button>
					</div>
				</div>
			</div>

		</fieldset>
	</form>
</div>
	<script type="text/javascript" src="../../js/libs/jquery-2.1.1.min.js"></script>
	<script type="text/javascript" src="../../js/jq.js"></script>
	<script type="text/javascript" src="../../js/plugin/bootstrapvalidator/bootstrapValidator.min.js"></script>
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript" src="../../layui/layui.js"></script>
	<script type="text/javascript" src="../../js/dict.js"></script>
	<script type="text/javascript">
		layui.use(['layer','laydate'], function(){
		    var layer = layui.layer;
			var laydate = layui.laydate;
			laydate.render({
				elem: '#approvalTime'
			});
			laydate.render({
				elem: '#estimateLandingTime',
				type: 'month'
			});
			laydate.render({
				elem: '#estimatedInstallationTime',
				type: 'month'
			});
		});
		showDictSelect("mainProducts", "mainProduct");
		showDictSelect("projectDebriefing", "prodebriefing");
		function add() {
			$('#form').bootstrapValidator();
			var bootstrapValidator = $("#form").data('bootstrapValidator');
			bootstrapValidator.validate();
		    if(!bootstrapValidator.isValid()){
			   return;
		    }
		    var formdata = $("#form").serializeObject();
			$.ajax({
				type : 'post',
				url : '/projectFollowInfos',
				contentType: "application/json; charset=utf-8",  
				data : JSON.stringify(formdata),
				success : function(data) {
					layer.msg("添加成功", {shift: -1, time: 1000}, function(){
                        location.href = "projectFollowInfoList.html";
                    });
				}
			});
		}
	</script>
</body>
</html>
